Forex Insight Pro 4.0Forex Insight Pro 4.0 for TradingView gives you abilities to see the stories hiding in the graphs of markets. It marks and reminds you about important parameters that are happening on the graph so that you will not forget to consider before placing orders. These parameter include:
Helps you count cc(x) that compares the close price of the last bar to that of x-1 bar earlier (the right most bar and the left most bar of x consecutive bars). It marks a number above the price bar if the close of the right is higher and mark a number below the price bar if the close of the right is lower. A sequence of consecutive numbers from cc(x) counting of x=5 below the price bars up to count number 9 will show exhaustion of downtrend and the highest price among these 9 bars will set a cc(5) resistance line. A sequence of consecutive numbers from cc(x) counting of x=5 above the price bars up to count number 9 will show exhaustion of uptrend and the lowest price among these 9 bars will set a cc(5) support line. Both cc(5) support and resistance lines are often respected by the price actions as reversal levels.
Helps you to notice increment / decrement of Middle line of the Bollinger band indicator or increment/decrement of MACD indicator in colors. The normal Bollinger band indicator will have the gray middle line. You can set its color to blue/pink to reflect increasing/decreasing value of the Bollinger middle line or set its color to lime/red to reflect increasing/decreasing MACD value.
Helps you to notice RSI value when it comes back down from overbought condition by printing "RSI-Dn" above the price bar or when it comes back up from oversold condition by printing "RSI-Up" below the price bar.
Helps you to notice the crossing of MACD line and its smoothing Signal line by printing "MACD > Sig" below the price bar if the MACD line crosses above the Signal line and printing "MACD < Sig" above the price bar if the MACD line crosses below the Signal line. Crossing of MACD and Signal lines could be used as warning signs that the reversal of the price trend might follow in the near future.d as warning signs that the reversal of the price trend might follow in the near future.
Helps you to notice the crossing of MACD line between the positive and negative zones by printing "MACD > 0" below the price bar if the MACD line changes to positive region and printing "MACD < 0" above the price bar if the MACD line crosses into the negative region. Changing the sign of MACD value could be used as warning signs that the reversal of the price trend might follow in the near future.
Helps you to notice the crossing of the fast simple moving average line and slow simple moving average line by printing "F > S" below the price bar if the fast SMA line crosses above the slow SMA line and printing "F < S" above the price bar if the fast SMA line crosses below the slow SMA line. Crossings of fast and slow SMA often indicate reversal of the price trends. the price bar if the fast SMA line crosses below the slow SMA line. Crossings of fast and slow SMA often indicate reversal of the price trends.
Helps you to label the Local Maximum and Local Minimum bars. If the high price of the middle bar inside a group of 3 bars is higher than its left and right neighbors, the label "Max" is printed above that middle price bar. Similarly, the label "Min" is printed below that middle price bar if the low price of it inside a group of 3 bars is lower than those of its left and right neighbors. Local Maximum and Minimum helps a lot in drawing the most recent supply and demand lines in which the price may breakout from.
Helps you to label "C75" to the price bars that close at or above 75% of their own range and label "C25" to the price bars that close at or below 25% of their ow n range. A C75 bar is often followed by an uptrend while a C25 is often followed by a downtrend.
Helps you to see the highest and lowest prices of the previous day. These levels are very important for M and W trading in the time frame smaller than daily graph since both intraday double top and double bottom pattern often appear around the previous day's high and low prices.
Helps you to see the time periods of business hours for people working in the financial markets in Asia, Lodon, and New York. The market prices are active and often provide high opportunities for making profits during these time periods.
Parameters of features in the above list could be changed, or turned on/off easily in the input options of Forex Insight Pro 4.0 custom indicator.
=================================================================================================
The source code of Forex Insight Pro 4.0 custom indicator is protected.
Only invited TradingView members can apply this indicator to their forex, crypto currency and stock price charts.
Lifetime invitation is for 100 USD with free future upgrade and online support.
Rental invitation is for 10 USD/month.
Paypal, bank transfer and Bitcoin payments are welcome.
The author (DrGraph or Nimit Chomnawang, PhD) can be contacted with his TradingView handle.
=================================================================================================
How to install the script:
------------------------------
*Go to the bottom of this page and click on "Add to Favorite Scripts".
*Open a new chart and click on the "Indicators" tab.
*Click on the "Favorites" tab and choose "Forex Insight Pro 4.0".
*Right click anywhere on the graph, choose "Settings".
*In "Style" tab, choose the Dark Theme.
*In "Background" tab, uncheck "Indicator Arguments" and "Indicator Values".
*In "Timezone/Sessions" tab, choose Time Zone = Exchange or your time zone.
*At the bottom of settings window, click on "Template", "SaveAs...", then name this theme of graph setting for future call up such as "Forex Insight Pro".
*Click OK.
For free TradingView plan, you can add two more indicators to the chart. That means you may add RSI or MACD indicators with same parameters as those setup in Forex Insight Pro and Volume indicator to your graph. DrGraph regularly publish his educational idea on using features provided in Forex Insight Pro for profitable investments. You can follow him for how to use the tools.
Cari dalam skrip untuk "the script"
ZenAlgo - Golden VeinOverview and Motivation
This indicator combines multiple volume-weighted average price (VWAP) calculations from different timeframes and then merges them into a single composite line called “the Vein”. It begins by pulling a user-defined source (for instance, a typical price) and then anchors a VWAP on daily, weekly, monthly, quarterly, semiannual, and yearly intervals. By viewing all these timeframes together, the script captures multi-period trends in a way that stands apart from simpler, single-timeframe VWAP indicators. This comprehensive perspective is designed to offer practical benefits to those who monitor both short- and long-term VWAP behavior within a single tool.
Because it tracks many timeframes simultaneously, it can highlight instances when short-term and long-term VWAPs converge or diverge. Traders who need multi-timeframe validation may find this approach particularly helpful. Other free indicators typically restrict themselves to one or two timeframes, so the built-in multi-timeframe data in this script can save effort for those who rely heavily on VWAP analysis.
Core Inputs and Offsets
At the start, the script takes a single price input (e.g., the average of high, low, and close) and uses it to compute multiple VWAP lines. Users can also choose a distance factor (based on an ATR calculation) to control how far labels are placed from any crossover events. This distance sets how clearly the chart will display labels without overcrowding.
Beyond giving a cleaner visual, having a user-defined distance for labels means the script can adapt to any ticker’s volatility. If one trades assets with large intraday swings, the script leaves enough space for labels to remain readable. This flexibility is something that simpler free VWAP scripts might lack.
Multi-Timeframe VWAP Computations
The script calculates distinct VWAP lines: Daily, Weekly, Monthly, Quarterly (3-Month), Semiannual (6-Month), and Yearly (12-Month). Each line resets whenever it detects a new period has started, ensuring that each timeframe’s VWAP properly anchors to its own session window. This allows the indicator to track how the market perceives fair value (through VWAP) on multiple horizons, all at once.
Simultaneously checking these various intervals can offer added clarity to traders who want to compare immediate market conditions (e.g., daily) to broader contexts (e.g., quarterly or yearly). Tools that only show one or two timeframes may miss the nuances that arise when, say, daily VWAP aligns with monthly VWAP at a turning point.
Crossover Detection and Labeling
Whenever two different VWAP lines intersect, the script generates an internal crossover signal. It then draws small labels (e.g., D↑W or M↓Q) to highlight that a lower timeframe VWAP has moved above or below a higher timeframe VWAP. These labels use color-coding and an ATR-based offset to remain visible.
An additional subtle feature is how daily VWAP crossovers can optionally be displayed only on a specific weekday and hour. That allows users who only want to track daily crossovers under certain conditions (for example, a fixed point in the weekly cycle) to filter out other signals. This adaptability can be worth paying for if one needs advanced filtering—an area where simpler free VWAP cross indicators typically do not offer such granular control.
The “Golden VWAP” (Composite Calculation)
All six VWAP lines (daily, weekly, monthly, quarterly, semiannual, yearly) feed into a central average called “the Vein”. The script takes the midpoint of these six values on each bar, effectively combining short-, medium-, and long-term VWAP data into one. This composite serves as a reference line for overall market direction.
A volatility band (either a standard-deviation-based range or a user-defined percentage) wraps around this composite. The script thereby creates an upper and a lower boundary around the Golden VWAP, called “Resistance” and “Support.” Traders may interpret price moves beyond these levels as higher-probability expansions or contractions, but there is no guarantee of outcome. In choppier markets, breakouts above or below these bands might not lead to follow-through, so interpretation should always be combined with other evidence.
Simplified Market State Logic
By checking how price and the Golden VWAP behave from one bar to the next, the script tags the market state with labels like Bullish, Bearish, Super Bullish, or Super Bearish. These classifications hinge on whether the Golden VWAP is rising or falling, and whether price has crossed above or below the composite band. An optional table in the lower-left corner of the chart displays this label.
While such classification is convenient for scanning changing conditions quickly, it should be interpreted with caution. If the market is sideways or if volume patterns are erratic, the script can produce signals that do not align with real momentum. Treat these states as indications of potential bias rather than automatic buy or sell triggers.
Added Value
By gathering VWAP lines across multiple timeframes, generating alerts on all possible combinations of crossovers, and overlaying a composite VWAP with adjustable volatility bands, this script goes beyond typical single-timeframe VWAP indicators. It aims to let users track short-term shifts (e.g., daily crossing weekly) in the context of longer-term trends (e.g., yearly). This granularity and automation can reduce the need for multiple charts or manual recalculations of different VWAP windows.
Why It Can Be Worth Paying For
The capability to simultaneously anchor VWAP to multiple timeframes, detect crossovers, filter out daily signals by weekday/hour, and visualize a composite “Vein” with adjustable ranges represents a comprehensive feature set that free scripts often do not bundle together. For those who rely on multi-timeframe VWAP analysis, the time saved and clarity gained may justify a paid solution.
Interpreting Values
Crossover labels: Identify points where one timeframe’s VWAP moves above or below another. The direction (up or down) suggests potential momentum shifts.
Golden VWAP line: Treat it as the average “fair value” across all anchored periods. Large price moves above or below this line’s surrounding band might signal increased directional conviction—or false breakouts if volume is deceptive.
Market states: Use the Bullish/Super Bullish/Bearish/Super Bearish labels to gauge how price interacts with the composite’s slope and band.
How to Use It Best
Combine these signals with other risk-management methods.
Monitor multiple crossovers in tandem: for example, daily crossing weekly plus monthly crossing quarterly may offer stronger confluence.
Use the optional daily-label toggle to stay focused on selected higher-confidence signals if you find too many crossovers distracting.
Remember that every alert or label should be evaluated in broader market context and your own trading strategy.
Potential Shortcomings
As with any technical study, VWAP lines and crossovers are not foolproof predictors. The script can be less reliable in low-volume or fast-moving conditions. Large price shocks can cause abrupt changes that do not fit the typical patterns this indicator looks for.
In short, this script’s distinct advantage is showing multiple anchored VWAPs and a composite perspective in one place, offering fine control of alerts and appearance settings. Those who benefit most are chartists who want deeper VWAP insights across various timescales without juggling multiple separate indicators. However, like any technical tool, it should be understood as an aid rather than a guarantee of outcomes.
Day’s Open ForecastOverview
This Pine Script indicator combines two primary components:
1. Day’s Open Forecast:
o Tracks historical daily moves (up and down) from the day’s open.
o Calculates average up and down moves over a user-defined lookback period.
o Optionally includes standard deviation adjustments to forecast potential intraday levels.
o Plots lines on the chart for the forecasted up and down moves from the current day's open.
2. Session VWAP:
o Allows you to specify a custom trading session (by time range and UTC offset).
o Calculates and plots a Volume-Weighted Average Price (VWAP) during that session.
By combining these two features, you can gauge potential intraday moves relative to historical behavior from the open, while also tracking a session-specific VWAP that can act as a dynamic support/resistance reference.
How the Code Works
1. Collect Daily Moves
o The script detects when a new day starts using time("D").
o Once a new day is detected, it stores the previous day’s up-move (dayHigh - dayOpen) and down-move (dayOpen - dayLow) into arrays.
o These arrays keep track of the last N days (default: 126) of up/down move data.
2. Compute Statistics
o The script computes the average (f_average()) of up-moves and down-moves over the stored period.
o It also computes the standard deviation (f_stddev()) of up/down moves for optional “forecast bands.”
3. Forecast Lines
o Plots the current day’s open.
o Plots the average forecast lines above and below the open (Avg Up Move Level and Avg Down Move Level).
o If standard deviation is enabled, plots additional lines (Avg+StdDev Up and Avg+StdDev Down).
4. Session VWAP
o The script detects the start of a user-defined session (via input.session) and resets accumulation of volume and the numerator for VWAP.
o As each bar in the session updates, it accumulates volume (vwapCumulativeVolume) and a price-volume product (vwapCumulativeNumerator).
o The session VWAP is then calculated as (vwapCumulativeNumerator / vwapCumulativeVolume) and plotted.
5. Visualization Options
o Users can toggle standard deviation usage, historical up/down moves plotting, and whether to show the forecast “bands.”
o The vwapSession and vwapUtc inputs let you adjust which session (and time zone offset) the VWAP is calculated for.
________________________________________
How to Use This Indicator on TradingView
1. Create a New Script
o Open TradingView, then navigate to Pine Editor (usually found at the bottom of the chart).
o Copy and paste the entire code into the editor.
2. Save and Add to Chart
o Click Save (give it a relevant title if you wish), then click Add to chart.
o The indicator will appear on your chart with the forecast lines and VWAP.
o By default, it is overlayed on the price chart (because of overlay=true).
3. Customize Inputs
o In the indicator’s settings, you can:
Change lookback days (default: 126).
Enable or disable standard deviation (Include Standard Deviation in Forecast?).
Adjust the standard deviation multiplier.
Choose whether to plot bands (Plot Bands with Averages/StdDev?).
Plot historical moves if desired (Plot Historical Up/Down Moves for Reference?).
Set your custom session and UTC offset for the VWAP calculation.
4. Interpretation
o “Current Day Open” is simply today’s open price on your chart.
o Up/Down Move Lines: Indicate a potential forecast based on historical averages.
If standard deviation is enabled, the second set of lines acts as an extended range.
o VWAP: Helpful for determining intraday price equilibrium over the specified session.
Important Notes / Best Practices
• The script only updates the historical up/down move data once per day (when a new day starts).
• The VWAP portion resets at the start of the specified session each day.
• Standard deviation multiplies the average up/down range, giving you a sense of “volatility range” around the day’s open.
• Adjust the lookback length (dayCount) to balance how many days of data you want to average. More days = smoother but possibly slower to adapt; fewer days = more reactive but potentially less reliable historically.
Educational & Liability Disclaimers
1. Educational Disclaimer
o The information provided by this indicator is for educational and informational purposes only. It is a technical analysis tool intended to demonstrate how to use historical data and basic statistics in Pine Script.
2. No Financial Advice
o This script does not constitute financial or investment advice. All examples and explanations are solely illustrative. You should always do your own analysis before making any investment decisions.
3. No Liability
o The author of this script is not liable for any losses or damages—monetary or otherwise—that may occur from the application of this script.
o Past performance does not guarantee future results, and you should never invest money you cannot afford to lose.
By adding this indicator to your TradingView chart, you acknowledge and accept that you alone are responsible for your own trading decisions.
Enjoy using the “Day’s Open Forecast” and Session VWAP for better market insights!
[blackcat] L2 Six Round Positioning█ OVERVIEW
The script is an indicator designed to plot the direction (up, down, no change) of several moving averages (MA) on a separate chart, without overlaying the price data. It calculates Simple Moving Averages (SMA) for 3, 5, 8, 34, 60, 120, and 250 periods and uses conditional logic to determine the color and position of the plotted columns based on whether each MA is increasing, decreasing, or unchanged.
█ LOGICAL FRAMEWORK
The script is structured into three main sections:
1 — Input Parameters: None explicitly defined, but the script uses default settings for the indicator function.
2 — Calculations: Computes Simple Moving Averages (SMA) for seven different periods.
3 — Plotting: Uses conditional logic to plot columns representing the direction of each MA, with positions and colors indicating whether the MA is increasing, decreasing, or unchanged.
The flow of data is straightforward: the script calculates the SMAs, determines their direction, sets the appropriate color, and then plots the columns.
█ CUSTOM FUNCTIONS
• No custom functions are defined in this script. All calculations and plotting are done using built-in Pine Script functions such as ta.sma for SMA calculation and plot for plotting.
█ KEY POINTS AND TECHNIQUES
• Use of ta.sma: The script effectively uses the ta.sma function to calculate Simple Moving Averages for different periods.
• Conditional Logic: The script employs conditional logic (ternary operators) to determine the color and position of the plotted columns based on the direction of each MA.
• Plotting with plot: The plot function is used extensively to display the direction of each MA with different colors and positions.
• Color Transparency: The use of color.new with transparency (e.g., color.new(color.green, 50)) allows for visually distinct colors that are not too overpowering.
█ EXTENDED KNOWLEDGE AND APPLICATIONS
• Modifications: The script could be enhanced by adding input parameters to allow users to customize the periods of the moving averages, colors, and transparency levels.
• Extensions: Similar techniques could be applied to other types of moving averages (e.g., EMA, WMA) or to other technical indicators.
• Strategy Development: This indicator could serve as a component in a larger trading strategy by providing insights into the overall trend direction across multiple timeframes.
• Related Concepts: Understanding of moving averages, conditional logic, and plotting techniques in Pine Script would be beneficial for further development and customization of this script.
Top-Down Trend and Key Levels with Swing Points//by antaryaami0
Overview
The “Top-Down Trend and Key Levels with Swing Points” indicator is a comprehensive tool designed to enhance your technical analysis by integrating multiple trading concepts into a single, easy-to-use script. It combines higher timeframe trend analysis, key price levels, swing point detection, and ranging market identification to provide a holistic view of market conditions. This indicator is particularly useful for traders who employ multi-timeframe analysis, support and resistance levels, and price action strategies.
Key Features
1. Higher Timeframe Trend Background Shading:
• Purpose: Identifies the prevailing trend on a higher timeframe to align lower timeframe trading decisions with the broader market direction.
• How it Works: The indicator compares the current higher timeframe close with the previous one to determine if the trend is up, down, or ranging.
• Customization:
• Trend Timeframe: Set your preferred higher timeframe (e.g., Daily, Weekly).
• Up Trend Color & Down Trend Color: Customize the background colors for uptrends and downtrends.
• Ranging Market Color: A separate color to indicate when the market is moving sideways.
2. Key Price Levels:
• Previous Day High (PDH) and Low (PDL):
• Purpose: Identifies key support and resistance levels from the previous trading day.
• Visualization: Plots horizontal lines at PDH and PDL with labels.
• Customization: Option to show or hide these levels and customize their colors.
• Pre-Market High (PMH) and Low (PML):
• Purpose: Highlights the price range during the pre-market session, which can indicate potential breakout levels.
• Visualization: Plots horizontal lines at PMH and PML with labels.
• Customization: Option to show or hide these levels and customize their colors.
3. First 5-Minute Marker (F5H/F5L):
• Purpose: Marks the high or low of the first 5 minutes after the market opens, which is significant for intraday momentum.
• How it Works:
• If the first 5-minute high is above the Pre-Market High (PMH), an “F5H” label is placed at the first 5-minute high.
• If the first 5-minute high is below the PMH, an “F5L” label is placed at the first 5-minute low.
• Visualization: Labels are placed at the 9:35 AM candle (closing of the first 5 minutes), colored in purple by default.
• Customization: Option to show or hide the marker and adjust the marker color.
4. Swing Points Detection:
• Purpose: Identifies significant pivot points in price action to help recognize trends and reversals.
• How it Works: Uses left and right bars to detect pivot highs and lows, then determines if they are Higher Highs (HH), Lower Highs (LH), Higher Lows (HL), or Lower Lows (LL).
• Visualization: Plots small markers (circles) with labels (HH, LH, HL, LL) at the corresponding swing points.
• Customization: Adjust the number of left and right bars for pivot detection and the size of the markers.
5. Ranging Market Detection:
• Purpose: Identifies periods when the market is consolidating (moving sideways) within a defined price range.
• How it Works: Calculates the highest high and lowest low over a specified period and determines if the price range is within a set percentage threshold.
• Visualization: Draws a gray box around the price action during the ranging period and labels the high and low prices at the end of the range.
• Customization: Adjust the range detection period and threshold, as well as the box color.
6. Trend Coloring on Chart:
• Purpose: Provides a visual cue for the short-term trend based on a moving average.
• How it Works: Colors the candles green if the price is above the moving average and red if below.
• Customization: Set the moving average length and customize the uptrend and downtrend colors.
How to Use the Indicator
1. Adding the Indicator to Your Chart:
• Copy the Pine Script code provided and paste it into the Pine Script Editor on TradingView.
• Click “Add to Chart” to apply the indicator.
2. Configuring Inputs and Settings:
• Access Inputs:
• Click on the gear icon next to the indicator’s name on your chart to open the settings.
• Customize Key Levels:
• Show Pre-Market High/Low: Toggle on/off.
• Show Previous Day High/Low: Toggle on/off.
• Show First 5-Minute Marker: Toggle on/off.
• Set Trend Parameters:
• Trend Timeframe for Background: Choose the higher timeframe for trend analysis.
• Moving Average Length for Bar Color: Set the period for the moving average used in bar coloring.
• Adjust Ranging Market Detection:
• Range Detection Period: Specify the number of bars to consider for range detection.
• Range Threshold (%): Set the maximum percentage range for the market to be considered ranging.
• Customize Visuals:
• Colors: Adjust colors for trends, levels, markers, and ranging market boxes.
• Label Font Size: Choose the size of labels displayed on the chart.
• Level Line Width: Set the thickness of the lines for key levels.
3. Interpreting the Indicator:
• Background Shading:
• Green Shade: Higher timeframe is in an uptrend.
• Red Shade: Higher timeframe is in a downtrend.
• Gray Box: Market is ranging (sideways movement).
• Key Levels and Markers:
• PDH and PDL Lines: Represent resistance and support from the previous day.
• PMH and PML Lines: Indicate potential breakout levels based on pre-market activity.
• F5H/F5L Labels: Early indication of intraday momentum after market open.
• Swing Point Markers:
• HH (Higher High): Suggests bullish momentum.
• LH (Lower High): May indicate a potential bearish reversal.
• HL (Higher Low): Supports bullish continuation.
• LL (Lower Low): Indicates bearish momentum.
• Ranging Market Box:
• Gray Box Around Price Action: Highlights consolidation periods where breakouts may occur.
• Range High and Low Labels: Provide the upper and lower bounds of the consolidation zone.
4. Applying the Indicator to Your Trading Strategy:
• Trend Alignment:
• Use the higher timeframe trend shading to align your trades with the broader market direction.
• Key Levels Trading:
• Watch for price reactions at PDH, PDL, PMH, and PML for potential entry and exit points.
• Swing Points Analysis:
• Identify trend continuations or reversals by observing the sequence of HH, HL, LH, and LL.
• Ranging Market Strategies:
• During ranging periods, consider range-bound trading strategies or prepare for breakout trades when the price exits the range.
• Intraday Momentum:
• Use the F5H/F5L marker to gauge early market sentiment and potential intraday trends.
Practical Tips
• Adjust Settings to Your Trading Style:
• Tailor the indicator’s inputs to match your preferred timeframes and trading instruments.
• Combine with Other Indicators:
• Use in conjunction with volume indicators, oscillators, or other technical tools for additional confirmation.
• Backtesting:
• Apply the indicator to historical data to observe how it performs and refine your settings accordingly.
• Stay Updated on Market Conditions:
• Be aware of news events or economic releases that may impact market behavior and the effectiveness of technical levels.
Customization Options
• Time Zone Adjustment:
• The script uses “America/New_York” time zone by default. Adjust the timezone variable in the script if your chart operates in a different time zone.
var timezone = "Your/Timezone"
• Session Times:
• Modify the Regular Trading Session and Pre-Market Session times in the indicator settings to align with the trading hours of different markets or exchanges.
• Visual Preferences:
• Colors: Personalize the indicator’s colors to suit your visual preferences or to enhance visibility.
• Label Sizes: Adjust label sizes if you find them too intrusive or not prominent enough.
• Marker Sizes: Further reduce or enlarge the swing point markers by modifying the swing_marker_size variable.
Understanding the Indicator’s Logic
1. Higher Timeframe Trend Analysis:
• The indicator retrieves the closing prices of a higher timeframe using the request.security() function.
• It compares the current higher timeframe close with the previous one to determine the trend direction.
2. Key Level Calculation:
• Previous Day High/Low: Calculated by tracking the highest and lowest prices of the previous trading day.
• Pre-Market High/Low: Calculated by monitoring price action during the pre-market session.
3. First 5-Minute Marker Logic:
• At 9:35 AM (end of the first 5 minutes after market open), the indicator evaluates whether the first 5-minute high is above or below the PMH.
• It then places the appropriate label (F5H or F5L) on the chart.
4. Swing Points Detection:
• The script uses ta.pivothigh() and ta.pivotlow() functions to detect pivot points.
• It then determines the type of swing point based on comparisons with previous swings.
5. Ranging Market Detection:
• The indicator looks back over a specified number of bars to find the highest high and lowest low.
• It calculates the percentage difference between these two points.
• If the difference is below the set threshold, the market is considered to be ranging, and a box is drawn around the price action.
Limitations and Considerations
• Indicator Limitations:
• Maximum Boxes and Labels: Due to Pine Script limitations, there is a maximum number of boxes and labels that can be displayed simultaneously.
• Performance Impact: Adding multiple visual elements (boxes, labels, markers) can affect the performance of the script on lower-end devices or with large amounts of data.
• Market Conditions:
• False Signals: Like any technical tool, the indicator may produce false signals, especially during volatile or erratic market conditions.
• Not a Standalone Solution: This indicator should be used as part of a comprehensive trading strategy, including risk management and other forms of analysis.
Conclusion
The “Top-Down Trend and Key Levels with Swing Points” indicator is a versatile tool that integrates essential aspects of technical analysis into one script. By providing insights into higher timeframe trends, highlighting key price levels, detecting swing points, and identifying ranging markets, it equips traders with valuable information to make more informed trading decisions. Whether you are a day trader looking for intraday opportunities or a swing trader aiming to align with the broader trend, this indicator can enhance your chart analysis and trading strategy.
Disclaimer
Trading involves significant risk, and it’s important to understand that past performance is not indicative of future results. This indicator is a tool to assist in analysis and should not be solely relied upon for making trading decisions. Always conduct thorough research and consider seeking advice from financial professionals before engaging in trading activities.
Strategy:Reversal-CatcherWhat
This is a plain and vanilla reversal based strategy for intraday (15m) timeframe on Futures prices of the assets.
Now what all it comprises of?
It finds out the dynamic support & resistance from Bollinger Band (20 period, 1.5 std dev).
It finds out the potential divergence of price deviation from 5 period exponential moving average (EMA).
If the previous candle (N-1) shows a divergence it confirms the reversal by checking the present candle (N) to be closed inside the Bollinger Band.
It confirms the momentum by checking RSI shows a crossover/crossunder to oversold (30) / overbought (70) region.
It also confirms whether the trend is up (then only reversal trade to short) or down (then only reversal trade to long). The trend is checked with EMA-21 and EMA-50.
Re-affirmation Condition : It re-affirms the position of two successive candles called as `hhLLong` and `hhLLShort` in the script.
Why
In Indian context, retail participants are pre-dominantly (yes- 80% of Indian daily volume) Options buyers mainly in weekly indices (Nifty, BankNifty, FinNifty, CNXMidcap, Sensex, Bankx .. well everyday is expiry now in India, except -- Thank God -- Saturday & Sunday).
And in Index Options the momentum plays a big role.
If one can catch a good reversal point the potential of high Risk-to-Reward trade (hence earn handsomely) is very likely (please note: there is no holy grail in trading. Nothing works 100%).
So this is the attempt to catch a reversal.
Re-affirmation of Reversal
hhLLong : It's a reversal point after an uptrend. It checks the relative positioning of current candle compared to that of previous candle. [The details are in the script. Check for variable hhLLong in script.
hhLLShort : It's a reversal point after a downtrend. It checks the relative positioning of current candle compared to that of previous candle. [The details are in the script. Check for variable hhLLShort in script.
Unique-ness
What's unique in it? Why we decided to publicly share this:
Already given the context of The Great Indian Options Buyers community. It should be helpful to them, we believe.
It takes Very Less Number of Trades with High Accuracy . Please check the result in NSE:NIFTY1! in 15m timeframe. 71% accuracy with roughly a trade in a month.
There is no point giving brokers' the brokerages taking 10 trades a day and ending not-so-good EoD. Better lets take less trades with better result possibility. .
Mention
There are many people uses this variation of Bolling Band, 5EMA
Many people use RSI, trends and relative positioning of candles.
--> We are grateful to all of them. It's really difficult to mention everyone's name. But all people somehow influence the thought process. Thanks for all of them.
Statutory Disclaimer
There is no silver bullet / holy grail in trading. Nothing works 100% time. One has to be careful about the loss (s)he can bear in case of the trade goes against.
We, as the author of this script, is not responsible for any trading or position decision one is taken based on the outcome of this.
It is our sole discretion to change, add, delete the portion or withdraw the whole script without any prior notice or intimation.
In Indian Context : We are not SEBI registered, will never be SEBI registered.
Monthly Strategy Performance TableWhat Is This?
This script code adds a Monthly Strategy Performance Table to your Pine Script strategy scripts so you can see a month-by-month and year-by-year breakdown of your P&L as a percentage of your account balance.
The table is based on realized equity rather than open equity, so it only updates the metrics when a trade is closed.
That's why some numbers will not match the Strategy Tester metrics (such as max drawdown), as the Strategy Tester bases metrics like max drawdown on open trade equity and not realized equity (closed trades).
The script is still a work-in-progress, so make sure to read the disclaimer below. But I think it's ready to release the code for others to play around with.
How To Use It
The script code includes one of my strategies as an example strategy. You need to replace my strategy code with your own. To do that just copy the source code below into a blank script, delete lines 11 -> 60 and paste your strategy code in there instead of mine. The script should work with most systems, but make sure to read the disclaimer below.
It works best with a significant amount of historical data, so it may not work very effectively on intraday timeframes as there is a severe limitation of available bars on TradingView. I recommend using it on 4HR timeframes and above, as anything less will produce very little usable data. Having a premium TradingView plan will also help boost the number of available bars.
You can hover your mouse over a table cell to get more information in the form of tooltips (such as the Long and Short win rate if you hover over your total return cell).
Credit
The code in this script is based on open-source code originally written by QuantNomad, I've made significant changes and additions to the original script but all credit for the idea and especially the display table code goes to them - I just built on top of it:
Why Did I Make This?
None of this is trading or investment advice, just my personal opinion based on my experience as a trader and systems developer these past 6+ years:
The TradingView Strategy Tester is severely limited in some important ways. And unless you use complex Excel formulas on exported test data, you can't see a granular perspective of your system's historical performance.
There is much more to creating profitable and tradeable systems than developing a strategy with a good win rate and a good return with a reasonable drawdown.
Some additional questions we need to ask ourselves are:
What did the system's worst drawdown look like?
How long did it last?
How often do drawdowns occur, and how quickly are they typically recovered?
How often do we have a break-even or losing month or year?
What is our expected compounded annual growth rate, and how does that growth rate compare to our max drawdown?
And many more questions that are too long to list and take a lifetime of trading experience to answer.
Without answering these kinds of questions, we run the risk of developing systems that look good on paper, but when it comes to live trading, we are uncomfortable or incapable of enduring the system's granular characteristics.
This Monthly Performance Table script code is intended to help bridge some of that gap with the Strategy Tester's limited default performance data.
Disclaimer
I've done my best to ensure the numbers this code outputs are accurate, and according to my testing with my personal strategy scripts it appears to work fine. But there is always a good chance I've missed something, or that this code will not work with your particular system.
The majority of my TradingView systems are extremely simple single-target systems that operate on a closed-candle basis to minimize many of the data reliability issues with the Strategy Tester, so I was unable to do much testing with multiple targets and pyramiding etc.
I've included a Debug option in the script that will display important data and information on a label each time a trade is closed. I recommend using the Debug option to confirm that the numbers you see in the table are accurate and match what your strategy is actually doing.
Always do your own due diligence, verify all claims as best you can, and never take anyone's word for anything.
Take care, and best of luck with your trading :)
Kind regards,
Matt.
PS. If you're interested in learning how this script works, I have a free hour-long video lesson breaking down the source code - just check out the links below this script or in my profile.
Divergences in 52 Week Moving Averages, Adjusted and SmoothedThis script description is intended to be holistic and comprehensive for the understanding of the interested parties who view the script.
Following the PineCoders suggestions, I have provided detailed breakdowns both within the code and in the description immediately below:
► Description
This description is intended to be detailed and meaningful, conveying the understanding of the script’s intention to the user:
The theory: Divergences and extreme readings in 52-Week highs on major indexes can provide a view into a potential pending move in the opposite direction of how the market has been trending. By comparing the 52-Week Hi/Lo indices and applying an Exponential Moving Average (EMA), we can assess how extreme a move is from the average. If the move provides an extreme reading, it would potentially be beneficial to “fade” the move (take a position in the opposing direction).
The intention: The intentionality of this script is to provide a visualization of when the highly-probable opportunity to fade over a multi-day or multi-week period arises. In addition to this, based on backtesting prior moves and reading the various levels of significant reversals, three tiers: “Standard”, “Sensitive”, and “Highly Sensitive” have been applied, the user can choose which sensitivity level they would like to see, there are far less false positives on the Standard and Sensitive settings, while Highly Sensitive often signals multiple times with the move coming a few days later.
The application: The settings allow the user to customize their sensitivity to the fade signals, with the ability to customize the visual that shows up as well. For higher-highs that are fade-worthy, the signal will appear on the top of the candle, for lower-lows that are fade-worthy, the signal will appear on the bottom of the candle. The users risk criteria should be the primary driver of the entry/exit, although when backtesting it appears that the significant move is typically completed within a 2-4 week period at max and 3-5 day period at minimum.
A personal note: I am a futures trader intraday but would very strongly caution users when using this strategy with futures (unless their risk tolerance is higher than most). The most beneficial strategy when fading moves would be to enter in tranches, starting at the first signal and adding on any pullback (as long as the pullback is not below the initial entry point). 1-6 Week Date-To-Expiry options would be the primary method for applying this strategy. I would also like to add that SPY/SPX options (SPDR S&P 500 ETF Trust / CBOE S&P 500 Index) are the most liquid options that could be applied in this strategy.
► Description (additional)
With the understanding that few users can read pinescript (Pine), the description above contains all of the necessary information that is necessary for a user to understand the intention for script utilization. For those who do understand Pine, the code is commented in each section in order to provide an understanding of the underlying functions, calculations, and thought process that went on during the writing of the script.
► Description (additional)
This script’s description contains no delegations, all aspects of the script as well as the initial idea behind it are contained in the description above, which is self-contained in it’s entirety with a clear and defined purpose that is written with the intent to holistically capture the intent of the potential use for this indicator.
► General House Rule #2
This script and the description (as well as my profile) contain no links or associations to promotion of any kind, I am not a business, I am not an individual that will in any way make money from this script or the promotion of another person, idea, company, entity, or legal persons (foreign or domestic).
► Originality and usefulness
This is an original and custom script (and idea) that is not a rehashing or a copy of any code from any other programmers in the tradingview community.
Crypto Uptrend Script + Pullback//Volume CandlesDescription: his is an adaption of my Pullback candle - This works on all timeframes and Markets (Forex//Stocks//)
Crypto Uptrend Script with Pullback Candle allows traders to get into a trend when the price is at end of a pullback and entering a balance phase in the market (works on all markets). The use of Moving averages to help identify a Trends and the use of Key levels to help traders be aware of where strong areas are in the market.
This script can work really well in Crypto Bull Runs when used on HTF and with confluences
The script has key support and resistance zones which are made up of quarterly data. Price reacts to these areas but patience is required as price will take time to come into these areas
I have updated the Pullback Candle with the use of Volume to filter out the weak Pullback Candles -
There are new candles to the script.
The First candle is the Bullish Volume Candle - This candle is set to a multiplier of 2x with a crossover of 50/100 on Volume - this then will paint a purple candle.
Uses of the Bullish Volume Candle:
Breakthrough of key areas // special chart patterns
Rejection of key areas
End of a impulse wave (Profit Takers)
The second candle is a Hammer - I prefer using the Hammers on Higher Timeframes however they do work on all timeframes. .
The third candle is a Exhaustion of impulse downward move.
Uses of this candle - can denote a new trend but has to be with confluence to a demand area // support area or with any use of technical analysis - using this alone is not advised
The fourth candle is a indecision candle in the shape of a Doji - this candle can help identify if the trend is in a continuation or a reversal
This script can work really well in Crypto Bull Runs
Disclaimer: There will be Pullbacks with High Volume (Breakouts) and not go the way as intended but this script is to allow traders to get into trends at good price levels. The script can paint signals in areas where price is too expensive so please do your own due diligence on the markets as this script is to help get into good areas of price
Please leave a thumbs up if you like this script and message me for information on how to use the script.
Weis V5 zigzag jayySomehow, I deleted version 5 of the zigzag script. Same name. I have added some older notes describing how the Weis Wave works.
I have also changed the date restriction that stopped the script from working after Dec 31, 2022.
What you see here is the Weis zigzag wave plotted directly on the price chart. This script is the companion to the Weis cumulative wave volume script.
What is a Weis wave? David Weis has been recognized as a Wyckoff method analyst he has written two books one of which, Trades About to Happen, describes the evolution of the now-popular Weis wave. The method employed by Weis is to identify waves of price action and to compare the strength of the waves on characteristics of wave strength. Chief among the characteristics of strength is the cumulative volume of the wave. There are other markers that Weis uses as well for example how the actual price difference between the start of the Weis wave from start to finish. Weis also uses time, particularly when using a Renko chart
David Weis did a futures io video which is a popular source of information about his method. (Search David Weis and futures.io. I strongly suggest you also read “Trades About to Happen” by David Weis.
This will get you up and running more quickly when studying charts. However, you should choose the Traditional method to be true to David Weis technique as described in his book "Trades About to Happen" and in the Futures IO Webcast featuring David Weis
. The Weis pip zigzag wave shows how far in terms of bar close price a Weis wave has traveled through the duration of a Weis wave. The Weis zigzag wave is used in combination with the Weis cumulative volume wave. The two waves should be set to the same "wave size".
To use this script, you must set the wave size: Using the traditional Weis method simply enter the desired wave size in the box "How should wave size be calculated", in this example I am using a traditional wave size of .25. Each wave for each security and each timeframe requires its own wave size. Although not the traditional method devised by David Weis a more automatic way to set wave size would be to use Average True Range (ATR). Using ATR is not the true Weis method but it does give you similar waves and, importantly, without the hassle described above. Once the Weis wave size is set then the zigzag wave will be shown with volume. Because Weis used the closing price of a wave to define waves a line Bar highs and bar lows are not captured by the Weis Wave. The default script setting is now cumulative volume waves using an ATR of 7 and a multiplication factor of .5.
To display volume in a way that does not crowd out neighbouring volumes Weis displayed volume as a maximum of 3 digits (usually). Consider two Weis Wave volumes 176,895,570 and 2,654,763,889. To display wave volume as three digits it is necessary to take a number such as 176,895,570 and truncate it. 176,895,570 can be represented as 177 X 10 to the power of 6. The number displayed must also be relative to other numbers in the field. If the highest volume on the page is: 2,654,763,889 and with only three numbers available to display the result the value shown must be 265 (265 X 10 to the power of 7). Since 176,895,570 is an order of magnitude smaller than 2,654,763,889 therefore 175,895,570 must be shown as 18 instead of 177. In this way, the relative magnitudes of the two volumes can be understood. All numbers in the field of view must be truncated by the same order of magnitude to make the relative volumes understandable. The script attempts to calculate the order of magnitude value automatically. If you see a red number in the field of view it means the script has failed to do the calculation automatically and you should use the manual method – use the dialogue box “Calculate truncated wave value automatically or manually”. Scroll down from the automatic method and select manual. Once "manual" is selected the values displayed become the power values or multipliers for each wave.
Using the manual method you will select a “Multiplier” in the next dialogue box. Scan the field and select the largest value in the field of view (visible chart) is the multiplier of interest. If you select a lower number than the maximum value will see at least one red “up”. If you are too high you will see at least one red “down”. Scroll in the direction recommended or the values on the screen will be totally incorrect. With volume truncated to the highest order values, the eye can quickly get a feel for relative volumes. It also reduces the crowding and overlapping of values on the screen. You can opt to show the full volume to help get a sense of the magnitude of the true volumes.
How does the script determine if a Weis wave is continuing to grow or not?
The script evaluates the closing price of each new bar relative to the "Weis wave size". Suppose the current bar closes at a new low close, within the current down wave, at $30.00. If the Weis wave size is $0.10 then the algorithm will remember the $30.00 close and compare it to the close of the next bar. If the bar close price does not close equal to or lower than $30.00 or close equal to or higher than $30.10 then the wave is still a down wave with a current low of $30.00. This is true even if the bar low is less than $30.00 or the bar high is greater than 30.10 – only the bar’s closing price matters. If a bar's closing price climbs back up to a close of $30.11 then because the closing price has moved more than $0.10 (the Weis wave size) then that is a wave reversal with a new up-trending wave. In the above example if there was currently a downward trending wave and the bar closes were as follows $30.00, $30.09, $30.01, $30.05, $30.10 The wave direction would continue to stay downward trending until the close of $30.10 was achieved. As such $30.00 would be the low and the following closes $30.09, $30.01, $30.05 would be allocated to the new upward-trending wave. If however There was a series of bar closes like this $30.00, $30.09, $30.01, $30.05, $29.99 since none of the closes was equal to above the 10-cent reversal target of $30.10 but instead, a new Weis wave low was achieved ($29.99). As such the closes of $30.09, $30.01, $30.05 would all be attributed to the continued down-trending wave with a current low of $29.99, even though the closing price for the interim bars was above $30.00. Now that the Weis Wave low is now 429.99 then, in order to reverse this continued downtrend price will need to close at or above $30.09 on subsequent bar closes assuming now new low bar close is achieved. With large wave sizes, wave direction can be in limbo for many bars before a close either renews wave direction or reverses it and confirms wave direction as either a reversal or a continuation. On the zig-zag, a wave line and its volume will not be "printed" until a wave reversal is confirmed.
The wave attribution is similar when using other methods to define wave size. If ATR is used for wave size instead of a traditional wave constant size such as $0.10 or $2 or 2000 pips or ... then the wave size is calculated based on current ATR instead of the Weis wave constant (Traditional selected value).
I have the option to display pseudo-Ord volume. In truth, Ord used more traditional zig-zag pivots of bar highs and lows. Waves using closes as pivots can have some significant differences. This difference can be lessened by using smaller time frames and larger wave sizes.
There are other options such to display the delta price or pip size of a Weis Wave, the number of bars in a wave, and a few other options.
New Bearish Downtrend Script - Perfect for Short SellingIts been a while since i last uploaded a script, what i have for you today is a script which works very efficiently for downtrends and spotting reversals. This is a script i use on a weekly basis when looking to short sell.
This script includes :
Updated** Rally Candles for HTF and LTF ( End of Impulsive move signal) - The psychology of the candle when used with market information can be viewed as a end or near to the end of a big impulsive leg - when this candle occurs in BEARISH CONDITIONS, we can assume price is likely to move away short term.
Major and Minor Support Levels HTF (Areas of interest)
The Psychology on these levels is price will do something at these key levels - it takes in the last quarter price action of High Open Low Close to generate the price levels and when price comes into these areas we are likely to see a bounce or rejection from this area.
Bearish Breakout Volume Candle - This candle will paint a Purple colour bar when volume breaks above the 7day average - this shows strong momentum in the market and will usually be seen when price is in a downtrend with strong momentum.. However when this does occur we can expect a short term bounce or base so don't trade the volume bar alone.
Indecision Candles - Psychology of this candle is to show exhaustion in the trend and ideally what to see this candle appear with Rally Candles at key areas for stronger set up. When the trend is moving up, the bearish doji can appear - i tend to look at this situation as a pause in the trend.
200 EMA
Everything in this script has alert conditions to provide an edge in the markets
This is an example of how the script will look on the HTF I'm using the Daily Timeframe for reference on TSLA
This is an example of how the script looks like on the LTF, price hit the Major Resistance twice and failed to hit the 3rd time and on each leg of the impulse, the chart portrayed the LTF Rally Candles
Heres an example on how to use both Major Resistance ( Area of Interest) Rally Candle and Volume Breakout as a trade set up idea - This setup idea was on Crude Oil last week and into this week.
When added to confluences such as Supply Zones, Mitigation Levels, Quasimodo patterns etc... this will enhance the script.
I will answer any questions if i haven't made the script clear or take any requests to improve the script.
Also will be uploading the Bullish Uptrend Script soon.
Buy/Sell on the levelsThis script is generally
My describe is:
There are a lot of levels we would like to buy some crypto.
When the price has crossed the level-line - we buy, but only if we have the permission in array(2)
When we have bought the crypto - we lose the permission for buy for now(till we will sell it on the next higher level)
When we sell some crypto(on the buying level + 1) we have the permission again.
There also are 2 protect indicators. We can buy if these indicators both green only(super trend and PIVOT )
Jun 12
Release Notes: Hello there,
Uncomment this section before use for real trade:
if array.get(price_to_sellBue, i) >= open and array.get(price_to_sellBue, i) <= close// and
//direction < 0 and permission_for_buy != 0
Here is my script.
In general - this is incredible simple script to use and understand.
First of all You can see this script working with only long orders, it means we going to get money if crypto grows only. Short orders we need to close the position on time.
In this script we buy crypto and sell with step 1% upper.
You can simply change the step by changing the price arrays.
Please note, if You want to see where the levels of this script is You Have to copy the next my indicator called LEVEL 1%
In general - if the price has across the price-level we buy some crypto and loose permission for buying for this level till we sell some crypto. There is ''count_of_orders" array field with value 2. When we bought some crypto the value turns to 0. 0 means not allowed to by on this level!!! The script buy if the bar is green only(last tick).
The script check every level(those we can see in "price_to_sellBue" array).
If the price across one of them - full script runs. After buying(if it possible) we check is there any crypto for sell on the level.
We check all levels below actual level( of actual level - ''i'' than we check all levels from 0 to i-1).
If there is any order that has value 0 in count of orders and index <= i-1 - we count it to var SELL amount and in the end of loop sell all of it.
Pay attention - it sells only if price across the level with red bar AND HAS ORDERS TO SELL WHICH WAS BOUGHT BELOW!!!
In Strategy tester it shows not-profitables orders sometimes, because if You have old Long position - it sells it first. First in - first out.
If the price goes down for a long time and You sell after 5 buys You sell the first of it with the highest value.
There is 2 protection from horrible buying in this strategy. The first one - Supertrend. If the supertrend is red - there is no permission for buy.
The second one - something between PIVOT and supertrend but with switcher.
If the price across last minimum - switcher is red - no permission for buy and the actual price becomes last minimum . The last maximum calculated for last 100 bars.
When the price across last maximum - switcher is green, we can buy. The last minimum calculation for last 100 bars, last maximum is actual price.
This two protections will save You from buying if price get crash down.
Enjoy my script.
Should You need the code or explanation, You have any ideas how to improve this crypt, contact me.
Vladyslav.
Jun 12
Release Notes: Here has been uncommented the protection for buy in case of price get down.
5 hours ago
Release Notes: Changed rages up to actual price to make it work
[Sextan] M-Oscillator BacktestLevel: 1
NOTE: This is a request by @scantor516 to backtest M-Oscillator by Mango2Juice with my Sextan framework. I ONLY take 5 minutes to perform it and how much time would you cost for this work?
Courtesy of Mango2Juice for M-Oscillator script.
You can backtest many of my indicators in minutes now! Of course,you can define your own indicator in the highlighted area in compliance with the uniform format, which guarantee when you use "Indicator on Indicator" function, it would not produce any error.
Background
Backtesting of technical indicators and strategies is the most common way to understand a quantitative strategy. However, the complicated configuration and adaptation work of backtesting many quantitative tools makes many traders who do not understand the code daunted. Moreover, although I have written a lot of strategies, I am still not very satisfied with the backtest configuration and writing efficiency. Therefore, I have been thinking about how to build a backtesting framework that can quickly and easily evaluate the backtesting performance of any indicator with a "long/short entry" indicator, that is, a "simple backtesting tool for dummies". The performance requirements should be stable, and the operation should be simple and convenient. It is best to "copy", "paste", and "a few mouse clicks" to complete the quick backtest and evaluation of a new indicator.
Luckily, I recently realized that TradingView provides an "Indicator on Indicator" feature, which is the perfect foundation for doing "hot swap" backtesting. My basic idea is to use a two-layer design. The first layer is the technical indicator signal source that needs to be embedded, which is only used to provide buy and sell signals of custom strategies; the second layer is the trading system, which is used to receive the output signals of the first layer, and filter the signals according to the agreed specifications. , Take Profit, Stop Loss, draw buy and sell signals and cost lines, define and send custom buy and sell alert messages to mobile phones, social software or trading interfaces. In general, this two-layer design is a flexible combination of "death and alive", which can meet the needs of most traders to quickly evaluate the performance of a certain technical indicator. The first layer here is flexible. Users can insert their own strategy codes according to my template, and they can draw buy and sell signals and output them to the second layer. The second layer is fixed, and the overall framework is solidified to ensure the stability and unity of the trading system. It is convenient to compare different or similar strategies under the same conditions. Finally, all trading signals are drawn on the chart, and the output strategy returns. test report.
The main function:
The first layer: "{Sextan} Your Indicator Source", the script provides a template for personalized strategy input, and the signal and definition interfaces ensure full compatibility with the second layer. Backtesting is performed stably in the backtesting framework of the layer. The first layer of this script is also relatively simple: enter your script in the highlighted custom script area, and after ensuring the final buy and sell signals long = bool condition, short = bool condition, the design of the first layer is considered complete. Input it into the PINE script editor of TradingView, save it and add it to the chart, you can see the pulse sequence in yellow (buy) and purple (sell) on the sub-picture, corresponding to the main picture, you can subjectively judge that the quality of the trading point of the strategy is good Bad.
The second layer: "{Sextan} PINEv4 Sextans Backtest Framework". This script is the standardized trading system strategy execution and alarm, used to generate the final report of the strategy backtest and some key indicators that I have customized that I find useful, such as: winning rate , Odds, Winning Surface, Kelly Ratio, Take Profit and Stop Loss Thresholds, Trading Frequency, etc. are evaluated according to the Kelly formula. To use the second layer, first load it into the TrainingView chart, no markers will appear on the chart, since you have not specified any strategy source signals, click on the gear-shaped setting next to the "{Sextan} PINEv4 Sextans BTFW" header button, you can open the backtest settings, the first item is to select your custom strategy source. Because we have added the strategy source to the chart in the previous step, you can easily find an option "{Sextan} Your Indicator Source: Signal" at the bottom of the list, this is the strategy source input we need, select and confirm , you can see various markers on the main graph, and quickly generate a backtesting profit graph and a list of backtesting reports. You can generate files and download the backtesting reports locally. You can also click the gear on the backtest chart interface to customize some conditions of the backtest, including: initial capital amount, currency type, percentage of each order placed, amount of pyramid additions, commission fees, slippage, etc. configuration. Note: The configuration in the interface dialog overrides the same configuration implemented by the code in the backtest script.
How to output charts:
The first layer: "{Sextan} Your Indicator Source", the output of this script is the pulse value of yellow and purple, yellow +1 means buy, purple -1 means sell.
The second layer: PINEv4 Sextans Backtest Framework". The output of this script is a bit complicated. After all, it is the entire trading system with a lot of information:
1. Blue and red arrows. The blue upward arrow indicates long position, the red downward arrow indicates short position, and the horizontal bar at the end of the purple arrow indicates take profit or stop loss exit.
2. Red and green lines. This is the holding cost line of the strategy, green represents the cost of holding a long position, and red represents the cost of holding a short position. The cost line is a continuous solid line and the price action is relatively close.
3. Green and yellow long take profit and stop loss area and green and yellow long take profit and stop loss fork. Once a long position is held, there is a conditional order for take profit and stop loss. The green horizontal line is the long take profit ratio line, and the yellow is the long stop loss ratio line; the green cross indicates the long take profit price, and the yellow cross indicates the long position. Stop loss price. It's worth noting that the prongs and wires don't necessarily go together. Because of the optimization of the algorithm, for a strong market, the take profit will occur after breaking the take profit line, and the profit will not be taken until the price falls.
4. The purple and red short take profit and stop loss area and the purple red short stop loss fork. Once a short position is held, there will be a take profit and stop loss conditional order, the red is the short take profit ratio line, and the purple is the short stop loss ratio line; the red cross indicates the short take profit price, and the purple cross indicates the short stop loss price.
5. In addition to the above signs, there are also text and numbers indicating the profit and loss values of long and short positions. "L" means long; "S" means short; "XL" means close long; "XS" means close short.
TradingView Strategy Tester Panel:
The overview graph is an intuitive graph that plots the blue (gain) and red (loss) curves of all backtest periods together, and notes: the absolute value and percentage of net profit, the number of all closed positions, the winning percentage, the profit factor, The maximum trading loss, the absolute value and ratio of the average trading profit and loss, and the average number of K-lines held in all trades.
Another is the performance summary. This is to display all long and short statistical indicators of backtesting in the form of a list, such as: net profit, gross profit, Sharpe ratio, maximum position, commission, times of profit and loss, etc.
Finally, the transaction list is a table indexed by the transaction serial number, showing the signal direction, date and time, price, profit and loss, accumulated profit and loss, maximum transaction profit, transaction loss and other values.
Remarks
Finally, I will explain that this is just the beginning of this model. I will continue to optimize the trading system of the second layer. Various optimization feedback and suggestions are welcome. For valuable feedback, I am willing to provide some L4/L5 technical indicators as rewards for free subscription rights.
Impact Zones - Skylyne InvestingWhat is the Impact Zone system:
The creation of Impact Zones started with our love for trading the Bond Market. Impact Zones were originally specifically tailored for the Bond market and now have been mastered to capture most of the Asset Classes out in the market today (Please look at Impact Zone Settings section for asset classes covered by this script). The Impact Zone system is a zone break (or market level break) following system with specific take profit points already established for you on the open of the market day (depending on your asset timing will vary).
*This script was designed for Intraday Trading, Long term or Swing Trading is not recommended with this system
The script will create buy and sell signals on the break of the Impact Zones when specific criteria is met along with the break of the zone. You do not have to use only our signals provided, you can also create your own trading rules based on our script.
Items to highlight:
Skylyne Upper Zone: Green Zone
Skylyne Middle: Yellow Line
Skylyne Lower Zone: Red Zone
Skylyne Take Profit Lines: Purple Lines
Skylyne Average: Orange Line (dynamic support/resistance)
Skylyne Overnight Session: Dark Blue (No Trade Zones)
Skylyne Signals: Buy / Sell
You can think of the Upper Zone as a bull zone and Lower zone as a bear zone, when price enters these zones we want to start watching price action to determine direction the market will take on the break or specified zone, whether it be a break and reversal or a break and run. This can be confirmed with either our signals (buy & sell) or the use of the dynamic support and resistance line (Skylyne Average).
Our script is written to capture market zones and place then on your screen with ease, we also have programmed in specific take profits and stop loss levels we have found the market respects on the intraday trading based on the Impact Zone captured.
The Impact Zones and Take Profit Levels change at Market open everyday. The levels provided will stay on your chart until the next Market open where the Impact Zones and Levels will change to accommodate that trading Day.
We recommend only using that trading days levels, however; using past levels can help trades depending on the case
The three Trades we want to highlight are:
1. Break of Impact Zones
a. This trade is taken when a break of the impact zone happens either in the positive or negative direction and traded to the next zone or take profit line (stop losses can be set with zones or the dynamic skylyne average crossovers)
2. Break of Skylyne Average
a. This trade is taken when price action confirms a bullish or bearish bias on the break of the average line (we would close this trade on the reverse break of the Skylyne Average using the zones as targets)
3. Break of the Skylyne Mid:
a. This trade is taken when a break of the Skylyne Mid level occurs and we use the upper and lower bounds of the Impact Zones as take profit and stop losses
Impact Zone Settings:
*Trading Category and Overnight Category must match the Asset Class being viewed on chart for accurate signals
1. Trading Category
a. Bonds
b. Corn/Wheat
c. Stocks
d. Index Futures
e. Euro/Dollar
f. Gold/Silver
2. Overnight Category
a. Bonds
b. Corn/Wheat
c. Stocks
d. Index Futures
e. Euro/Dollar
f. Gold/Silver
3. Chart Aggregation Limit (Default Value is 25 minutes)
Impact Zone Overnight Trading:
Impact Zone Overnight sessions are highlighted in a dark blue color and we use these highlighted time sessions as a NO TRADE session. Our system was built to be traded during normal market trading hours and overnight sessions tend to be less predictive in terms of direction and or zone reliance. If you choose to trade overnight sessions with Impact Zones, make sure you make a very in depth trading plan and stick to the rules set for yourself.
Impact Zone Signals:
1. Signals for buy or sell of the asset class happen on breaks of the Impact Zones, and when specific criteria are met that we determined necessary to evaluate the overall trend of the market
2. Not every break of the Impact Zones will trigger a signal
3. No signal will be generated during overnight sessions, we recommend studying overnight sessions before beginning to create your own overnight trading session plans based on Impact Zones
4. When a signal is generated you will use the next take profit line (purple line) in the direction of your trade you are in. Other trading signals were discussed above
5. If while you are in a trade and the skylyne average (orange line) is broke in the opposite direction of your trade you will take this as a dynamic stop, and in some cases a dynamic take profit
Impact Zone Charting Timeframes:
1. Recommendation of using the 1 minute chart aggregation bars to maximize profits and limit losses
2. The script has a default charting aggregation limit of 25 minutes, adjustments to the input (in the settings) to increase the aggregation limit need to be made in order to use higher than 25 minute timeframes
Charting Example:
First note is to notice how our publish example uses the 1-minute timeframe aggregation, this is because our script was written to maximize profit on the 1 minute time frame. The script can be used on any time frame, however; make sure that you increase the aggregation limit input when using timeframes above 25 minutes.
From the chart included in the script post, you can notice that buy and sell signals happen only when specified criteria is met, and not every time there is a crossover of the Impact Zones there is a signal. You do not only have to trade the buy and sell signals that our system provides, however; our team believes that these signals are one of the best ways to trade the Impact Zone script. If you deviate from only using signals provided and choose to use the Impact Zones differently, we recommend using the next level, or zone, in the direction of your trade as your take profit (As described in trade we want to highlight section)
Super Cipher BThis is the first release of Super Cipher B. The script will get regular updates and includes a user manual.
This is the first release of the script which is already powerful. The script has been designed to work as a binance futures trading bot.
I only recommend using it as it is now on coins that are in a long term bullish market.
I am not responsible for possible losses using this script as no script in the world can 100% guarantee to never take any losses.
The script is a modified version with new strategies and functionality. The original script was published for free by VumanChu, this script is based on the original code of that script. This is a version of the script used for Binance Futures botting and will provide buy Dots which are more failsafe than the original green divergence dot in the VumanChu script.
All info on how to set up the script for botting is inside the user manual: The user manual also includes my current profits on 3commas.
Weis pip zigzag jayyWhat you see here is the Weis pip zigzag wave plotted directly on the price chart. This script is the companion to the Weis pip wave ( ) which is plotted in the lower panel of the displayed chart and can be used as an alternate way of plotting the same results. The Weis pip zigzag wave shows how far in terms of price a Weis wave has traveled through the duration of a Weis wave. The Weis pip zigzag wave is used in combination with the Weis cumulative volume wave. The two waves must be set to the same "wave size".
To use this script you must set the wave size. Using the traditional Weis method simply enter the desired wave size in the box "Select Weis Wave Size" In this example, it is set to 5. Each wave for each security and each timeframe requires its own wave size. Although not the traditional method a more automatic way to set wave size would be to use ATR. This is not the true Weis method but it does give you similar waves and, importantly, without the hassle described above. Once the Weis wave size is set then the pip wave will be shown.
I have put a pip zigzag of a 5 point Weis wave on the bar chart - that is a different script. I have added it to allow your eye to see what a Weis wave looks like. You will notice that the wave is not in straight lines connecting wave tops to bottoms this is a function of the limitations of Pinescript version 1. This script would need to be in version 4 to allow straight lines. There are too many calculations within this script to allow conversion to Pinescript version 4 or even Version 3. I am in the process of rewriting this script to reduce the number of calculations and streamline the algorithm.
The numbers plotted on the chart are calculated to be relative numbers. The script is limited to showing only three numbers vertically. Only the highest three values of a number are shown. For example, if the highest recent pip value is 12,345 only the first 3 numerals would be displayed ie 123. But suppose there is a recent value of 691. It would not be helpful to display 691 if the other wave size is shown as 123. To give the appropriate relative value the script will show a value of 7 instead of 691. This informs you of the relative magnitude of the values. This is done automatically within the script. There is likely no need to manually override the automatically calculated value. I will create a video that demonstrates the manual override method.
What is a Weis wave? David Weis has been recognized as a Wyckoff method analyst he has written two books one of which, Trades About to Happen, describes the evolution of the now popular Weis wave. The method employed by Weis is to identify waves of price action and to compare the strength of the waves on characteristics of wave strength. Chief among the characteristics of strength is the cumulative volume of the wave. There are other markers that Weis uses as well for example how the actual price difference between the start of the Weis wave from start to finish. Weis also uses time, particularly when using a Renko chart. Weis specifically uses candle or bar closes to define all wave action ie a line chart.
David Weis did a futures io video which is a popular source of information about his method.
This is the identical script with the identical settings but without the offending links. If you want to see the pip Weis method in practice then search Weis pip wave. If you want to see Weis chart in pdf then message me and I will give a link or the Weis pdf. Why would you want to see the Weis chart for May 27, 2020? Merely to confirm the veracity of my algorithm. You could compare my Weis chart here () from the same period to the David Weis chart from May 27. Both waves are for the ES!1 4 hour chart and both for a wave size of 5.
TA Basics: further "Steps" with our Moving AverageSo far in this series of posts, we have worked thru creating a basic zero-lag moving average, then moved forward all the way to coding a "Fibonacci" Weighted Moving Average.
in this post we take a look at a technique that can help traders minimize noise in the underlying data and get better insight on the changes that are happening in the data series represented by the moving average. we'll look at adding "stepping" to our Fibonacci Moving Average as an example. we introduce the Stepping Fibonacci Moving Average , or Step_FiMA
note that you can use the same technique with any plot you may have. feel free to copy or leverage the relevant parts of the script - the script is commented to make this easier.
How is this useful?
==================
with "stepping", you get your indicator to "round" the outcome into pre-specified bands or ranges. this works very similar to how, for example, range or Renko charts work. you can easily see the difference in the chart above once we look at a non-stepped and a stepping moving average of the same length side-by-side
the more granular your timeframe is, you will see the effect of the stepping clearer - here's how the same chart looks when we go into the 1-hr aggregation
Notes about this script
====================
there are couple of pieces i wanted to highlight in the script if you plan to use some of it :
1 - the step(x) function is meant to try to automatically pick the best "suitable" step size based on the range of the underlying series (for example, the closing price). these ranges i included here in the code are just my own "best choices" - you are totally welcome to adjust these ranges and the resulting step size to your own preference
2 - we applied the stepping as a user-choice. user can choose a manual entry, or "0" to get the code to automatically pick the step size, or enter -1 (or actually any value below zero) to cancel the stepping option altogether - this gives us some flexibility on how to use the stepping in an indicator
3 - very important (and somehow confusing): on the "rounding" approach:
the magic math formula that actually creates the stepping is this one
result = round(input / step) * step
now, this tells the script to "round" the result up or down (the basic rounding) -- so for example, a price of 17 with a step of 5 would be rounded (down) to 15, where as a price of 18 would be rounded "up" to 20 -- this is not the way some of us would expect or want, cause the price never reached 20 and they would want an 18 to still be rounded to 15 - and the stepping line not to show 20 *until* the price actually hits or exceeds 20 -- in that case, you would need to replace the function "round" with the function "floor" --
so the new formula becomes: floor(input / step) * step
-- in an ideal world, we can make this rounding choice a user-option in the settings -- maybe in an improved version
4 - we kept the smoothing option, and it takes place before the stepping is applied - we continue to use that smoothing to further minimize the level changes in the FiMA line.
I hope you find this script useful in your journey with technical analysis and DIY scripting, and good luck in your trading.
GA - Momentum DivergencesGA Momentum Divergences Script highlights Trend Strength, Overbought-Oversold Conditions, Regular-Hidden Divergences. Besides, it shows the Buying-Selling Pressure.
The practical use of any Momentum Curve helps in the comprehension of:
Supply-Demand Absorption.
Thrusts and their shortening.
The reversing and the continuation of the trend.
True Strength of the Trend.
Price Strength.
Increase and Decrease in Buying-Selling Pressure.
You choose which curve to show, according to your needs. There are 2 groups of curves.
Momentum Curves
GA Momentum.
Commodity Channel Index ( CCI ).
Relative Strength Index ( RSI ).
Stochastic %K.
True Strength Indicator ( TSI ).
Money Flow Curves
GA Money Flow.
Chaikin Money Flow.
Money Flow Index.
Every Curve used in this script has 0 as center. This means that RSI and Stochastic Curves wave around 0 and not around 50.
Fractal Algorithm for Pivots and Divergences
GA Momentum script highlights Divergences. This is possible by the Fractal Calculation of Pivot Points .
The sensibility of the algorithm depends on the look back and on the look forward of pivot points . This means that it does not highlight every divergence. But it marks divergences according to settings.
Besides, the interpretation of those divergences depends on the experience of the trader.
This feature has a particular use for the purpose to simplify and optimize. Besides, it is a very important feature provided by the GA Money Flow script.
Regular and Hidden Divergences highlight the weakening and strengthening of the price behavior. They give an anticipation to price changing. Besides, they enforce the judgment on the condition that marks the price continuation.
The Fractal Algorithm can also mark a Channel. This happens enveloping the Curve between its marked pivot points .
Flags and lines mark Divergences in the Curve. GA Momentum Divergences highlights Regular Divergences and Hidden Divergences.
Price and Momentum, Volume and Money Flow
The GA Momentum script works with any marketplace. It uses price variations and volume variations, according to needs and market.
Every curve available in the script is a mathematical discretization of the market. But in those marketplaces that includes the volume you can use Money Flow Curves. Where the volume is missing the Money Flow Curves return zero. In this case, a Momentum Curve is the right choice because it uses the price variations.
GA Momentum and GA Money Flow are formulas built for this script. They include several peculiarities that are a privilege of other functions. This gives a better visual impact by their practical use.
TSI Curve or RSI Curve are the right choices to replace Money Flow Curves where the volume is not available. In the same way, RSI Curve can replace the TSI Curve for the Trend Strength. Then, the RSI Curve is universal. It works on any marketplace giving a lot of information, using it in the right way.
RSI is a slow curve. It waves above and below the middle line, according to the bullish and bearish trend . This is why it incorporates the Trend Strength in its calculation.
Instead, other choices give Faster Momentum Curves that give different advantages and peculiarities. The final result and purpose do not change.
Market Conditions
Overbought and Oversold Conditions could not cause the immediate reversing of the trend. The changing occurs according to Thrusts and their shortening.
This happens by one or more rebounds in the price action. Indeed, this marks hesitation to continue the advancing or the declining of the price.
The Momentum Curve can highlight the absorption of Supply Pressure and Supporting Demand. This precedes the Climactic Point so as a Thrust during the advancing or declining of the price.
True Strength and Money Flow curves follow the trend. They show where the trend is weakening or strengthening.
When these curves rise together with the trend, this confirms the trend. Instead, when these curves hesitate, they are marking a changing.
TSI and Money Flow have advantages. They show the continuation of the trend by its positive or negative value. Besides, they show the shortening of the trend. Moreover, the curve anticipates the shortening of the thrust.
Money Flow Curves highlights the prevailing of Buying Pressure of Selling Pressure. This is possible because their formulas includes the volume . But the TSI discretization that uses prices, works giving a fair result.
This returns an unconditional conclusion. The volume has a high relevance because of the correlation between effort and result. But despite this, the mathematical discretization of the market can work without it.
Short and Long Signal Lines
The GA Momentum plots 2 extra curves to support the market momentum interpretation. They are Exponential Moving Average applied to the momentum curve.
The Short Signal Line follows the main curve and it gives the first crossing for an entry signal. Of course, this is useful only when there are the right condition for an entry point.
Instead, the Long Signal Line exists to be a trending indicator. When the main curve is approaching it, rebounds, the shortening of the thrust, can mark a changing. Following the thrust, these curves become closer and closer for some waves. This becomes better visible by the plotting of the Histogram.
The Histogram shows the difference between the main curve and the Long Signal Line. The distance between those curves becomes relevant and helpful in many circumstances. This highlights the changing in the Strength or Weakness of the trend.
Short and Long Signal Curves can have a partial plotting. This reduces the impact of those curves on screen. The script can show them only when they give a relevant visual impact for the trading practice.
Coloring
GA Momentum Script colors curve and price bars. It highlights conditions where the price is Overbought or Oversold. But it highlights also divergences with labels and colored lines.
The script plots colors on bars with extended prices. Besides, the script plots colors on bars that are the ending of divergences
GA Momentum script colors the price bars using the same criteria applied to color curves. Color used on the Curve are the same used on the price bars.
True Strength Curve and Momentum Curves color price bars. This happens for the entire Trend Strength. Then the prevailing of the Buying Pressure or Bearish Pressure is also visible on bars. This occurs by the persistent green or red colors according to Pressure and Trend.
Alerts
GA Momentum provides 2 alerts for Bearish and Bullish Signals. Both uses the crossing of Short and Long Signals in the same direction.
Note: I restrict access to the tool.
Regards
Girolamo Aloe
Founder of Profiting Me
Triple Moving Average HeatmapHi everyone
I didn't publish on Friday because I was working on an Expert Advisor in MT4. The day I don't publish, some scripts spamming guys published many (not useful) scripts the same to kick me out of the TOP #1 ranking.
So what I'm going to do about it? crying or sharing more quality scripts than before? :)
I guess you know the answer :) I'm gonna share a few quality scripts that I have in my library. I noticed that you guys tend to like more the scripts useful for your trading actually making you money rather than a copy-paste (of another copy-paste)
Alright, enough for the trolling now let's introduce the Three MA heatmap which is an upgrade of that script : MA-heatmap-Double-cross-edition/
The challenge was to keep the heatmap not rolling and to make it match with the MA cross. I did it using this
```
since_ma_buy = barssince(macrossover)
since_ma_sell = barssince(macrossunder)
heatmap_color() =>
since_ma_buy < since_ma_sell ? color.new(color.green, 20) : since_ma_buy > since_ma_sell ? color.new(color.red, 20) : na
```
This is a technique that I found after drinking three glasses of red wine (#french) to keep the heatmap stable and not rolling.
To get what I'm saying I invite you to replace the piece of code above by what everyone would normally do
```
heatmap_color() =>
macrossunder() ? color.new(color.green, 20) : macrossover() ? color.new(color.red, 20) : na
```
Ah and I'm not done sharing for the day, a few scripts are coming also after that one and tonight !!!!! I want to live in a world where you guys can enjoy quality scripts (mostly) :)
PS
____________________________________________________________
Feel free to hit the thumbs up as it shows me that I'm not doing this for nothing and will motivate to deliver more quality content in the future.
- I'm an officially approved PineEditor/LUA/MT4 approved mentor on codementor. You can request a coaching with me if you want and I'll teach you how to build kick-ass indicators and strategies
Jump on a 1 to 1 coaching with me
- You can also hire for a custom dev of your indicator/strategy/bot/chrome extension/python
Dragon-Bot - Default ScriptDragon-Script is a framework to make it as easy as possible to test your own strategies and set alerts for external execution bots. This is the alerts version of the script.
The script has many features build in, like:
1) A ping/pong mechanism between longs and shorts
2) A stop-loss
3) Trailing Stops with several ways to calculate them.
4) 2 different ways to flip from long to short.
The script is divided into several parts.
The first part of the script is used to set all the variables. You should normally never change the first part except for the comments at the top.
The second part of the script is the part where you initialise all your indicators. Several indicators can be found on Tradingview and on other sites. Please keep in mind that all the variable names used in the indicator should be unique. (all the … = … parts)
The third part of the script, is the most important part of the script. Here you can create the entry and exit points.
Let’s look at the OPENLONG function to explain this part: The first variables are all the possible entries; These are longentry1 till longentry5. You can add many more if you like.
The variables are all initialised as being false. This way the script can set a value to true if an entry happens.
The if function is the actual logic: You could say “if this is true” then (the line below the if function) longentry1 := (becomes) true.
In this case we have said: “if this is true” then (the line below the if function) longentry1 := (becomes) true when the current close is larger than the close that is 1 back.
The last part is the makelong_funct. This part says that if any of the entries are true, the whole function is true.
The last part of the script is the actual execution. Here the alerts are plotted and the back test strategies are opened and closed.
We hope you guys like it and all feedback is welcome!
CMYK RMI TRIPLE Automated strategy▼ This is the strategy version of the script.
◊ Introduction
This script makes use of three RMI 's, that indicate Overbought/Oversold on different timescales that correspond with Frequency’s that move the market.
◊ Origin
The Relative Momentum Index was developed by Roger Altman and was introduced in his article in the February, 1993 issue of Technical Analysis of Stocks & Commodities magazine.
While RSI counts up and down ticks from close to close, the Relative Momentum Index counts up and down ticks from the close relative to a close x number of days ago.
This results in an RSI that is smoother, and has another setting for fine tuning results.
This bot originated out of Project XIAM , an investigative script that outlined my approach towards Automated Trading Strategies.
Are you interested in writing bots yourself ? check out the beta version of this script.
It has many bugs, but also most of the Skeleton.
◊ Usage
This script is intended for Automated Trading with AUTOVIEW or TVAUTOTRADER , on the 1 minute chart.
◊ Features Summary
Overlay Mode
Indicator Mode
Three RMI's
Trend adjustment
Pyramiding
Ignore first entries
Take Profit
Stop Loss
Interval between Entries
Multiring Fix
Alert signal Seperation
◊ Community
Wanna try this script out ? need help resolving a problem ?
CMYK :: discord.gg
AUTOVIEW :: discordapp.com
TRADINGVIEW UNOFFICIAL :: discord.gg
◊ Setting up Autoview Alerts
Use the study version of this script, To set up The Alerts Autoview Picks up on.
The Signals to work with are :
Open 1 Long
Use this to open one Long Position.
With quantity being : /
Once per bar
Being larger than 0
Comment example : e=exchange b=long q=amount t=market
Open 1 Short
Use this to open one Short Position.
With quantity being : /
Once per bar
Being larger than 0
Comment example : e=exchange b=short q=amount t=market
Close1 Position
Use this to Close The amount of one Open Position.
With quantity* being : /
Once per bar
Being larger than 0
Comment example : e=exchange c=position q=amount t=market
*Beware when using a percental % quantity, instead of an absolute quantity.
Percental Quantities are based on the , Not
And will change in absolute value relative to the amount of open trades.
Close All positions
Use this to Close All Open Positions.
With quantity being :
Once per bar
Being larger than 0
Comment example : e=exchange c=position t=market
For the specific Syntax used in the comment of the alert, visit Autoview .
◊ Setting up TVAutotrader
Use the strategy version of this script, And load it into TVAT .
◊ Backtesting
Use the strategy version of this script for backtesting.
◊ Contact
Wanna try this script out ? need help resolving a problem ?
CMYK :: discord.gg
MMTools - Backtester❖ Overview
Backtester is a script implemented as a strategy, featuring multiple conditions and tools to offer an alternative way to work with Catcher. It supports both backtesting and algorithmic trading, allowing you to evaluate the indicator's performance on historical data for any instrument using the Strategy Tester.
❖ Settings
⚙️ Custom Conditions and Signals
This section is intended to provide flexibility when working with Catcher. (If you intend to use Catcher alone, this section can be disregarded). You may combine the primary indicator (Catcher) with additional custom indicators to define entry and exit signals. Simply add the custom indicator to your chart, display it and then select its name in the corresponding dropdown menu. By default, the 'Close' option is selected, meaning custom conditions are disabled.
Operator 'OR': An entry order is activated when either your custom signal or the primary signal occurs.
Operator 'AND': An entry order is activated only when both the custom and primary signals occur simultaneously.
If both 'AND' and 'OR' operators are used, enabling the 'Only Primary' option will apply the 'AND' operator only to the primary indicator.
Custom Exit: Allows the strategy to close a position based on a custom signal, in addition to standard exit conditions. The first condition met will trigger the exit.
Note: The strategy executes orders at the open of the next bar after the custom condition is met.
⚙️ Confirmation
When enabled, the strategy will enter a position only if a specified number of signals occur within a defined lookback period.
⚙️ Exits
Two types of exit mechanisms are available for take-profit and stop-loss:
Timeout: Sets a maximum duration (in bars) that a trade can remain open. If this limit is exceeded, the strategy will close the position.
Percentage-Based: Exit positions based on a specified percentage move.
⚙️ Start Date
Specifies the starting point for the backtest.
⚙️ Plotting
The green line represents the take-profit level, while the red line indicates the stop-loss level. Plotting is limited to the last 250 bars.
⚙️ Other Settings
Remember to configure additional parameters under the “Properties” tab, including commissions, slippage, and pyramiding. Default commission is set at 0.05%.
❖ Access
Please refer to the Author's Instructions field to request access to the script.
-----------------------------------------------------------
Disclaimer
The information provided by my scripts is for informational purposes only and does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making financial decisions.
ZenAlgo - DetectorThis script combines multiple volume data sources, calculates several forms of volume-based metrics, displays a table for Spot vs. Perpetual volumes, and visualizes several technical elements (such as cumulative delta, divergences, fractals, and specialized moving averages). The primary objective is to help analyze volume activity across different exchanges, compare Spot vs. Perpetual markets, and observe how shifting volumes may coincide with price action characteristics. This description aims to clarify each component, explain how the calculations are performed, and show you how to interpret the various chart markings.
Why Combine These Metrics in One Script?
Many publicly available volume-related tools focus only on a single exchange or a single type of volume (like spot or futures). This script merges multiple exchange sources for spot and perpetual data into a unified view. By doing so, users can detect discrepancies or confirm alignment between different markets without juggling multiple indicators. It also processes volume-derived signals (delta, divergences, fractals, etc.) in one place, sparing you from manually combining various standalone scripts. Through this integration, it becomes easier to observe how price and volume interact across different market segments.
Core Concept: Aggregated Volume
The script begins by collecting volumes from multiple exchanges in two categories:
Spot volumes – Typically aggregated under symbols ending with "USDT" or a user-selected currency, and
Perpetual volumes – From perpetual futures contracts (e.g., symbols ending in "USD.P" or "USDT.P").
All these exchange volumes are requested via the built-in request.security() function in a single line for each exchange. The user can enable or disable each exchange in the inputs. The script then calculates an "aggregated volume" for Spot, an aggregated volume for Perpetual, and an overall combined total.
This aggregated volume is used later to break down how much of each bar's volume can be considered "buy" or "sell" based on the bar's candle structure (body vs. wicks).
Volume-Based Calculations: Buy vs. Sell Volume and Delta
For each bar, the script estimates how much of the aggregated volume can be associated with a "buy side" and a "sell side."
Volume Buy is computed if the bar's close is above the open , giving more weight to the candle's body and allocating some portion of volume to the wicks as well.
Volume Sell is similarly computed if the bar's close is below the open .
This results in a Delta value: Delta = (Buy Volume) – (Sell Volume).
Additionally, the script accumulates these values over a user-defined "lookback length" to provide Cumulative Delta . This can help show longer-term directional volume bias.
Table: Spot vs. Perpetual Comparison
There is a toggle ("Show Spot vs Perpetual Table") that displays an on-chart table comparing volumes:
Buy Volume and Sell Volume for each aggregated category (Spot, Perp, and their sum).
Delta (the difference between Buy and Sell).
Percentage breakdowns of buy vs. sell portions.
This table only appears on the most recent bar and helps users quickly assess how Spot and Perpetual volumes compare, plus the overall total.
PVSRA Color Coding
A "PVSRA-style" color approach classifies each bar based on volume and candle range:
Climax Up (lime) or Climax Down (red) occurs if volume is extremely high relative to a simple moving average of volume and range.
Above-Average Up (blue) or Down (fuchsia) occurs if volume is moderately higher than average.
Otherwise, colors fall back to neutral up/down colors.
This allows you to spot potentially high-volume "climax" bars vs. bars with only moderate or typical volume levels.
Fractals and Divergences
The script detects certain fractal points on the aggregated volumes (sum of buy or sell volumes). It looks for a 5-bar pattern (with the current bar in the middle for top or bottom fractals).
When a fractal is confirmed on buy volume, the script checks if new higher price highs coincide with lower buy-volume peaks (or vice versa) to highlight regular or hidden divergences.
Similar logic is applied on the sell-volume side if new lower price lows occur alongside higher sell-volume troughs (or the opposite).
If enabled in the settings, lines and labels may appear on the chart to mark these divergence points.
"Delta Dot" Events
This script draws small circles above or below bars when the total delta changes magnitude relative to the previous bar by certain user-defined multipliers. It segregates "tiny," "small," "large," and "extra" expansions in bullish or bearish delta.
Bullish Dots : Appear above the bar when the new positive delta is multiple times bigger than the previous positive delta.
Bearish Dots : Appear below the bar in a similar fashion for negative delta.
These dots emphasize large or sudden shifts in buy/sell pressure from one bar to the next.
Delta MA and its Direction
A moving average is calculated on the total delta and optionally multiplied by a factor (in the code, by 4) to make it visually prominent. The user can pick from SMA, EMA, WMA, RMA, or HMA as the smoothing technique.
Delta MA Direction : The script compares the current delta MA to a short SMA of itself to define whether it is rising or falling.
A color is assigned—blue if rising, orange if falling, gray if they're roughly equal.
This helps quickly visualize longer-term momentum in the net delta metric.
Divergences on the Delta MA
After computing the "Delta MA" line, the script detects pivot highs or lows on that line. If the price makes a new high but the Delta MA pivot is lower (and vice versa), it draws lines and small labels indicating potential divergence.
Bearish Divergence : Price makes a higher high, while the Delta MA pivot forms a lower high.
Bullish Divergence : Price makes a lower low, while the Delta MA pivot forms a higher low.
RSI + MFI Computation
The script also calculates a simplified form of RSI+MFI by comparing (close – open) / (high – low) * a multiplier , then smoothing it with a simple average. This is purely for an optional observational measure to see if the price action is leaning bullish or bearish in terms of these combined indicators.
EMA Overlay and Diamond Shapes
There are two standard EMAs (13 and 21). The script checks whether price is above or below these EMAs, in addition to other conditions (like changes in delta, volume, or RSI+MFI direction) to draw diamond shapes at the top or bottom of the chart:
Green Diamonds near the bottom if the conditions line up to suggest that the environment is more favorable for bullish pressure.
Red Diamonds near the top if the environment suggests more bearish pressure.
These diamonds come in two sizes:
Normal – More pronounced, typically plotted if RSI+MFI result is above/below zero.
Small – Plotted if RSI+MFI is on the other side of that threshold.
An optional "Hardcore Mode" adds special tiny diamonds under specific delta color/condition mismatches.
How to Interpret the Chart Elements
Line Plots of Buy and Sell Volumes : A positive line for buy volume, a negative line for sell volume, and a zero-line for reference. This provides at-a-glance perspective on how buy or sell volumes add up per bar.
Histogram "Total Delta" : A color-coded bar that quickly shows whether overall buy vs. sell volume is dominant. The color is governed by the PVSRA logic (e.g., potential climax or above-average conditions).
Volume Table (when enabled): Summarizes volumes in numeric and percentage form for Spot, Perp, and total categories on the last bar.
Delta Dots : Small circles highlighting abrupt changes in delta magnitude. Larger multiples indicate bigger jumps compared to the previous bar.
Fractals & Divergence Lines : Connect pivot points in buy/sell volume or in the Delta MA line with price highs/lows to indicate potential divergences.
Delta MA Plot : Smooth curve (scaled up x4) to reflect longer-term accumulation or distribution in the delta. Colored by whether the MA is above or below a short average of itself.
Diamonds : Appear when certain volume, price, RSI+MFI, and delta conditions converge. Green diamonds near the bottom typically coincide with bullish conditions, red diamonds near the top with bearish conditions.
Practical Usage Notes
Use the Spot vs. Perp breakdown to see if these two market segments differ significantly in their contributions to total volume. This can be informative when a certain type of market (futures vs. spot) might be "driving" price action.
The PVSRA color scheme highlights "climax" or "above-average" volume bars, which can sometimes appear around major reversals or breakouts.
Observing divergences in aggregated buy/sell volume (or in the Delta MA line) can provide additional context on whether certain price moves are backed by strong volume involvement.
The script's fractal divergences rely on short pivot detection. Signals will appear only after enough bars have passed for confirmation, so these are effectively "after-the-fact" notations to illustrate possible volume/price divergences.
The diamonds do not necessarily instruct any buy/sell action; rather, they mark conditions where multiple volume and momentum criteria line up in one direction.
Important Considerations
This script displays aggregated volumes from potentially multiple exchanges. Each exchange or pair might have different time zones, liquidity, or data availability, which can occasionally result in incomplete or zero values.
All references to "buy" or "sell" volume are approximate breakdowns based on candle structure. They are not absolute measures of real-time order flow.
Divergences and fractal points are provided strictly for analytical insight. They can repaint or shift if the fractal conditions were not fully confirmed in real time.
The color-coded lines, histograms, diamonds, and tables are strictly to guide analysis of volume fluctuations and do not claim to predict future price performance.
If you enable "Hardcore Mode," you will see additional diamond markers. This mode is mainly intended as an extra highlight of certain "contradictory" delta conditions.
Summary
The "ZenAlgo - Detector" script brings together a variety of volume-based analyses:
Aggregated volumes from multiple exchanges
A breakdown into Spot vs. Perpetual activity
Delta calculations, fractal divergences, and a specialized Delta Moving Average
Color-coded bars reflecting possible PVSRA concepts
A table to highlight numeric differences and percentages
Additional overlays (e.g., diamonds, RSI+MFI synergy, etc.)
In contrast to many free, single-exchange indicators, this script centralizes multiple exchange volumes in one place, making it easier to observe and compare volume flows across different market types (spot vs. perpetual). Users no longer need to rely on scattered tools or separate overlays to check volume divergences, fractals, or specialized MA calculations—everything is unified here. By carefully monitoring the table, Delta histogram, color-coded bars, divergence lines, and diamond markers, traders can more comprehensively evaluate how volume and price interact. Each plot is designed to showcase different aspects of volume flow—such as whether spot or derivatives markets dominate, if volume is skewed toward buying or selling, and if there are divergences between volume momentum and price movement.
All computations are displayed to help you carry out a more informed market analysis. It is strongly advised to combine these observations with other risk management or analytical methods, rather than relying on any single indicator alone.